package org.smileface.designpattern.singleton;

/**
 * @description: 单例模式-饿汉式
 * @author: chujian
 * @since: 2022-02-14 09:35
 **/
public class Singleton1 {
    // 类加载时创建实例
    private static final Singleton1 INSTANCE = new Singleton1();

    // 私有化构造方法
    private Singleton1() {
    }

    public static Singleton1 getInstance() {
        return INSTANCE;
    }

}
